#pragma once
#include <nice2d/piece/piece.h>
#include <nice2d/components/done.h>

class PieceVisitor
{
public:
    virtual void visitPiece(std::shared_ptr<Piece> piece);
    std::vector<std::shared_ptr<Piece>> getPieces()const;
protected:
    std::vector<std::shared_ptr<Piece>> pieces;
};

class SpecifiedColorPieceVisitor : public PieceVisitor
{
public:
    SpecifiedColorPieceVisitor() = delete;
    SpecifiedColorPieceVisitor(const sf::Color& newColor);

    void visitPiece(std::shared_ptr<Piece> piece) override;
private:
    sf::Color color;
};

class SpecifiedColorPieceNotDoneVisitor : public PieceVisitor
{
public:
    SpecifiedColorPieceNotDoneVisitor() = delete;
    SpecifiedColorPieceNotDoneVisitor(const sf::Color& newColor);

    void visitPiece(std::shared_ptr<Piece> piece) override;
private:
    sf::Color color;
};
